package com.ews.onlineexchange.model;

import org.hibernate.validator.constraints.Email;
import org.hibernate.validator.constraints.Length;

import javax.persistence.Entity;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

/**
 * @program: SdewsOnlineExchange_dys
 * @description: 政务服务我建言
 * @author: wangchangqing
 * @create: 2021-03-11 11:14
 **/
@Entity
public class Advice extends DataEntity {

    private String name;

    @Pattern(regexp = "^\\s{0}$|^((17[0-9])|(14[0-9])|(13[0-9])|(15[^4,\\D])|(19[^4,\\D])|(18[0,1,2,5-9]))\\d{8}$", message = "请输入正确格式的手机号码")
    private String phone;

    @Email(message = "邮箱格式错误！")
    private String email;

    @NotNull
    private String title;

    @Length(max = 4000)
    @NotNull
    private String content;

    private String ip;

    public String getIp() {
        return ip;
    }

    public void setIp(String ip) {
        this.ip = ip;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }
}
